package com.seh.usercenter.feignclient;

import com.seh.usercenter.dto.AddressInfoDTO;
import com.seh.usercenter.dto.GoodsDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "seh-content-center")
public interface ContentCenterFeignClient {
    /**
     * 查询所有商品
     * @return
     */
    @GetMapping("/api/findAll")
    List<GoodsDTO> findAll();

    /**
     * 批量添加地址
     * @param addressInfoList
     * @return
     */
    @PostMapping("/address/addAddresses")
    String addAddresses(@RequestBody List<AddressInfoDTO> addressInfoList);

    /**
     * 修改地址信息
     * @param addressInfoDTO
     * @return
     */
    @PostMapping("/updateAddress")
    String updateAddress(@RequestBody AddressInfoDTO addressInfoDTO);

}
